package com.lan.lexer;


import java.util.ArrayList;
import java.util.List;

public class Token {

    private String lexeme;

    private String arType;

    private Token next;

    private List<Token> scope;

    public Token(String lexeme, String arType) {
        this.lexeme = lexeme;
        this.arType = arType;
    }

    public String getLexeme() {
        return lexeme;
    }

    public String getArType() {
        return arType;
    }

    public Token next() {
        return next;
    }

    public Token next(Token next) {
        this.next = next;
        return next;
    }

    public List<Token> scope() {
        return scope;
    }

    public Token scope(Token token) {
        if (scope == null) {
            scope = new ArrayList<>();
        }
        scope.add(token);
        return token;
    }
}
